package com.jpa.web;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class HomeController {
	/**
	 * 访问根路径时跳转到/templates/index.html页面
	 */
	@RequestMapping(value = "/")
	public String loginIndex() {
		return "index";
	}

	/**
	 * 跳转到/templates/login.html登录页面
	 */
	@GetMapping(value = "/login")
	public String login() {
		return "login";
	}

	/**
	 * 登录成功后跳转到/templates/home/index.html 
	 */
	@RequestMapping(value = "/home/index")
	public String homeIndex() {
		return "home/index";
	}
}
